(function($){
	
	$.extend($.simpleGrid.types,{
		'imgBoolean' : {
				getValue: function(grid, parent){
					return ($(parent).find('input:checkbox').is(':checked'));
				},
				show:  function(grid, value, options){
					if(value == true){
						return $('<img src="'+grid.options.themePath+'images/tick.jpg" alt="OK" />');
					}else{
						return ' ';
					}
				},
				showEdit: function(grid, value, options){
					if(value == true || (options.defaultValue == true && value == null)){
						return $('<input type="checkbox" checked="checked" class="grid_boolean" name="'+options.name+'" value="true" />');
					}else{
						return $('<input type="checkbox" class="grid_boolean" name="'+options.name+'" value="true" />');
					}
				},
				getOrdenableValue: function(grid, parent){
					if(($(parent).find('img').get().length > 0)){
						return 1;
					}
					return 0;
				}
		}
	});
})(jQuery);